import request from '/@/utils/request';

// 获取字典列表 TypeId: 361052632944709， 税率: TypeId: 361061529649221, 币种 TypeId: 277534340079687
const getSysDictData = (params: object = {}) => {
	return request({
		url: '/sysDictData/list',
		method: 'get',
		data: params,
	});
};

// 人员查询
const getUserList = (params: object = {}) => {
	return request({
		url: '/sysEmp/selector',
		method: 'get',
		data: params,
	});
};

// 获取审核流程列表
const getCheckList = (params: object = {}) => {
	return request({
		url: '/sysCheckflow/getFlowSelector',
		method: 'get',
		data: params,
	});
};

//获取字典数据(下拉框) 公司:
const getDictDropDownData = (params: object = {}) => {
	return request({
		url: '/sysDictType/dropDown',
		method: 'get',
		data: params,
	});
};
//选择职位
const getPositionData = (params: object = {}) => {
	return request({
		url: '/sysPos/page',
		method: 'get',
		data: params,
	});
};
//查询项目信息
const getProjectInfoList = (params: object = {}) => {
	return request({
		url: '/xmFieldSchedule/page',
		method: 'get',
		data: params,
	});
};
//所属模块
//模糊查询记得加params 参数
const getModuleNameList = (params: object = {}) => {
	return request({
		url: '/sysDictData/page',
		method: 'get',
		data: params,
	});
};

// 获取供应商列表
const getSupplierList = (params: object = {}) => {
	return request({
		url: '/cgSupplierInfo/page',
		method: 'get',
		data: params,
	});
};
// 获取供应商付款类型
const getSupplierPaymentList = (params: object = {}) => {
	return request({
		url: '/cgSupplierPayment/selector',
		method: 'get',
		data: params,
	});
};
// 获取仓库列表
const getWareHouseList = (params: object = {}) => {
	return request({
		url: '/xmWarehouse/selector',
		method: 'get',
		data: params,
	});
};

/**获取项目编号第二种 
 1-扣款单、收款计划、预付款单
2-现场管理
3-请购单普通申请
4-请购单维保项目*/
const getTwoProjectInfoList = (params: object = {}) => {
	return request({
		url: '/xmProject/GetItemNo',
		method: 'get',
		data: params,
	});
};

//项目评审-获取客户名称
const getProjectNameList = (params: object = {}) => {
	return request({
		url: '/xmCustomerInfo/customerList',
		method: 'get',
		data: params,
	});
};

const requestTotal = {
	getSysDictData,
	getUserList,
	getCheckList,
	getDictDropDownData,
	getPositionData,
	getProjectInfoList,
	getModuleNameList,
	getSupplierList,
	getSupplierPaymentList,
	getWareHouseList,
	getTwoProjectInfoList,
	getProjectNameList
};

export default requestTotal;
